import { updateUserInfoService } from '../../../model/service/account/updateInfo';
import { getUserInfo } from '../account/userInfo';

const updateSocketId = async (params: IAnyObject) => {
  // 判断是不是有用户的唯一id
  const { uid } = params;
  const result = await getUserInfo({ uid });
  if (result.length === 0) {
    console.log('找不到该用户')
    return;
  } else {
    const result = await updateUserInfoService(params);
    return result;
  }
}

export default updateSocketId;